package com.mentaleye.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mentaleye.dal.dao.StudentPropertyReturnRecordDao;
import com.mentaleye.dal.model.StudentPropertyReturnRecordExample.Criteria;
import com.mentaleye.dal.model.StudentPropertyReturnRecord;
import com.mentaleye.dal.model.StudentPropertyReturnRecordExample;
import com.mentaleye.service.StudentPropertyReturnRecordService;

@Service
public class StudentPropertyReturnRecordServiceImpl implements StudentPropertyReturnRecordService {

	@Autowired private StudentPropertyReturnRecordDao recordDao;
	
	@Override
	public boolean insertRecord(StudentPropertyReturnRecord record) {
		return this.recordDao.insertRecord(record);
	}

	@Override
	public boolean updateRecord(StudentPropertyReturnRecord record) {
		return this.recordDao.updateRecord(record);
	}

	@Override
	public boolean deleteByList(List<Long> idList) {
		StudentPropertyReturnRecordExample example=new StudentPropertyReturnRecordExample();
		Criteria criteria = example.createCriteria();
		criteria.andRecordIdIn(idList);
		return this.recordDao.deleteByExample(example);
	}

	@Override
	public List<StudentPropertyReturnRecord> getList() {
		StudentPropertyReturnRecordExample example=new StudentPropertyReturnRecordExample();
		return this.recordDao.getListByExample(example);
	}

	@Override
	public List<StudentPropertyReturnRecord> getListByKeys(List<Long> idList) {
		StudentPropertyReturnRecordExample example=new StudentPropertyReturnRecordExample();
		Criteria criteria = example.createCriteria();
		criteria.andRecordIdIn(idList);
		return this.recordDao.getListByExample(example);
	}
	
	@Override
	public List<Map<String, Object>> getListByMap(Map<String, Object> map) {
		return this.recordDao.getListByMap(map);
	}

}
